package FirstExam10tasks;

public class Task9 {

	public static void main(String[] args) 
	{
		int[][] arr = {	{1,1,1,1,1,1},
						{2,2,2,2,2,2},
						{3,3,3,3,3,3},
						{4,4,4,4,4,4},
						{5,5,5,5,5,5},
						{6,6,6,6,6,6}};
	
	
		int a = 0;
		
		while(a < arr.length)
		{
						
			for(int i = 0; i < arr.length; i++)
			{
				
				if(i%2 == 0)
				{
				}
				else
				{
					int temp = arr[a][i];
					arr[a][i] = arr[a+1][i];
					arr[a+1][i] = temp;
				}
				
			}
			a += 2;
		}
		
		for(int i = 0; i < arr.length; i++)
		{
			for(int j = 0; j < arr[i].length; j++)
			{
				System.out.print(arr[i][j] + " ");
			}
			System.out.println();
		}
		
		
		
	}
}
